package admin.data;

import models.TransactionModel;

import com.googlecode.objectify.Objectify;
import com.googlecode.objectify.ObjectifyService;

public class TransactionData {
	private Objectify ofy;
	
	public TransactionData() {
		try {
			ObjectifyService.register(TransactionModel.class);
		} catch (Exception e) {
			// TODO: handle exception
		}
		
		ofy = ObjectifyService.begin();
	}
	
	public void insert(TransactionModel transaction) {
		ofy.put(transaction);
	}
	
	public void delete(TransactionModel transaction) {
		ofy.delete(transaction);
	}
}
